<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
	<legend>{$page_name}</legend>
</fieldset>
<form action="{:url(request()->action())}" method="post">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
	<ul class="layui-tab-title">
		<li class="layui-this">基础信息</li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<div class="layui-form">
				<div class="layui-form-item">
					<label class="layui-form-label">跳转地址</label>
					<div class="layui-input-inline" style="width: 400px;">
						<input type="text" class="layui-input wy-type-input" name="url" value="{$info.url}" lay-verify="ver_input" placeholder="请输入跳转地址">
					</div>
					<div class="layui-form-mid layui-word-aux">请输入跳转地址：http(s)://www.baidu.com</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="layui-form">
	<div class="layui-form-item">
		<div class="layui-input-block">
			<input name="id" type="hidden" value="{$info.id}">
			<button class="layui-btn" type="button"
					lay-submit
					lay-filter="wy-lists"
				>确认提交</button>
			<button type="reset" class="layui-btn layui-btn-primary">重新填写</button>
		</div>
	</div>

</div>
</form>
<script>
var Kind_upload_json = "{:url('editor/kind_upload_json')}";
var Kind_file_manager_json = "{:url('editor/kind_file_manager_json')}";
</script>

<link href="{$public}kind_editor/themes/default/default.css{$version}" rel="stylesheet">
<script src="{$public}kind_editor/kindeditor-all.js{$version}"></script>
<script src="{$public}kind_editor/kind_editor_config.js{$version}"></script>

<script>
layui.use(['form','layer','element'], function(){
	var $		= layui.jquery,
		element = layui.element,
		$parent	= parent.layui.jquery,
		$top	= parent.parent.layui.jquery,
		layer	= layui.layer,
		parent_layer	= parent.layui.layer,
		top_layer		= parent.parent.layui.layer,
		form	= layui.form;

	form.on('submit(wy-lists)',function(data){

		var _this = $(this);
		_this.prop("disabled",true);
		var layer_tip = layer.load(1,{shade: [0.5,'#000']});
		var _form_action = _this.parents('form');
		$.post(
			_form_action.attr('action'),
			_form_action.serialize(),
			function(ret_data){
				_this.prop("disabled",false);
				if(ret_data['code'] == 1){
					layer.msg(
						ret_data.msg,
						{icon: 1,time: 2000},
						function(){
							// 刷新列表
							location.reload();
						}
					);
				}else{
					layer.msg(ret_data.msg,{icon: 2});
					layer.close(layer_tip);
				}
			},
			'JSON'
		);
	});
});
</script>
</body>